using System;
using System.Collections.Generic;
using System.Text;

namespace Sandia.MVCFramework.Data
{
    /// <summary>
    /// A "base" class for exceptions.  
    /// </summary>
    /// <remarks>
    /// This is a simple IData wrapper for passing exception through the MVS framework. 
    /// Individual components can subclass this to get their own individualized exception
    /// but at the same time you could implements a component that just listens for IData
    /// of this type so that it can trap all the exceptions.
    /// </remarks>
    public class ExceptionData: GenericIData<Exception> {

        /// <summary>
        /// Create a new ExceptionData object
        /// </summary>
        /// <param name="e">The exception.</param>
        public ExceptionData(Exception e) : base(e) { }

        /// <summary>
        /// The exception associated with this IData object
        /// </summary>
        public Exception Exception
        {
            get { return this.Obj; }
        }
    }
}
